A lens fixed to the middle of the screen, and the words slide through it: full size in the middle, narrower and shorter toward the top and bottom of the lens, gone at its edge - like words printed on a drum that is rolling past you. Move the word up or down and it rolls. depth is how tight the lens is: 1 is as tall as the screen, 6 is tight.
Works differently on Game Boy - The Game Boy shows a TEXT_DRUM text only while its middle is inside the lens, whole and at full width: it does not narrow toward the edge of the lens (24 letters at most, drawn with sprites).
Works differently on Game Boy Color - The Game Boy Color shows a TEXT_DRUM text only while its middle is inside the lens, whole and at full width: it does not narrow toward the edge of the lens (24 letters at most, drawn with sprites).
Sega Genesis: not built yet
On other consoles this differs: see Side by side and How the consoles differ.
TEXT_DRUM: constantNames the drum, a shape for draw_text_3d and draw_text_3d_anchored (and its scaled form, draw_text_3d_scaled). The other three shapes put the curve on the words, and it goes wherever the words go. The drum puts it on the screen: there is a lens in the middle of the picture, and words slide through it. A word in the middle row is full size and perfectly flat. As it slides up or down it gets narrower and shorter, and at the edge of the lens it closes up to nothing - like words printed on a drum that is rolling past you.


The same call every frame, with only y changing: the word rolls down through the lens. Nine real pictures, played in a loop. The picture is real; the movement is the point, so a viewer that does not play it shows only the first frame.
So the thing you animate is the word's own y. Draw it low and move it up and it rises out of the floor, growing as it comes; park it at the middle row (80 on the 160 pixel screen) and it stands there looking completely ordinary; push it on and it dwindles away over the top. That is what makes it good for a title that arrives, a round or level name, a word that slams in or recedes into the distance as a scene begins.


Six frames of the roll, the word's row written under each (row 80 is the middle).
The words go through the lens like this: a row that is far from the middle is drawn smaller than one near the middle, and the size falls off as the square of the distance, so it is nearly full size for a good way either side of the middle and then drops away quickly toward the edge. The table is made for you.
depth is a whole number from 1 to 6 and it sets how tall the lens is, in rows above and below the middle of the screen:
| depth | the lens reaches | what it is like |
|---|---|---|
| 1 | 100 rows each way | taller than the screen: a word is only squashed a little near the top and the bottom |
| 2 | 84 rows | |
| 3 | 72 rows | a word is clearly smaller by the time it is half way to the edge |
| 4 | 62 rows | |
| 5 | 54 rows | |
| 6 | 46 rows | a tight lens: a word is full size only close to the middle and has closed up well before the edge of the screen |


The same word, held in one place 34 rows below the middle, at each depth. The word has not moved: the lens has.
A number outside 1 to 6 is held to the nearest end, and 0 draws plain, flat text (and costs nothing), exactly as it does for the other shapes.
moonrise example does exactly that, and its README measured the difference (2 row effects and a matrix held, or none).draw_text_3d in a Draw event with TEXT_DRUM still puts the lens on the middle of the screen, so a word that sits still in the room rolls through the lens when the camera moves. For a banner, use draw_text_3d in a Draw GUI event, or draw_text_3d_anchored.draw_text_3d. The lens is worked out in memory the first time it is used, so it adds nothing to the size of the game.text_align(ALIGN_CENTER);
draw_text_3d(120, 80 + wave(-70, 70, 180, 0), "STAGE 2", TEXT_DRUM, 3);A word that rolls up and down the middle of the screen over and over (one trip up and back every three seconds), shrinking as it goes toward either edge of the lens.
text_align(ALIGN_CENTER);
draw_text_3d(120, 80, "STAGE 2", TEXT_DRUM, 3);The same word standing still in the middle row, where the lens does nothing to it: plain, full size. Change the 80 and it rolls away from the middle.